import { request } from ".";
import type { ListData } from "../types";
import type { Good, GoodFilter } from "../types/good";

export const getGoodsList = (params: GoodFilter) => {
  return request<ListData<Good>>({
    url: "/wx/good",
    method: "GET",
    data: params,
  });
};

export const getGoodDetail = (id: number) => {
  return request<Good>({
    url: `/wx/good/${id}`,
    method: "GET",
  });
};
